import request from '@/utils/request'
// 获取月卡信息列表
export const getCard = (params) => request.get('/parking/card/list', { params })
// export function getCar(params) {
//   return request({
//     url: '/parking/card/list',
//     method: 'get',
//     params
//   })
// }
// 增加月卡
export const addCard = (data) => request.post(' /parking/card', { data })
// export function addCard(data) {
//   return request({
//     url: '/parking/card',
//     method: 'POST',
//     data
//   })
// }
// 查看月卡详情
export const getCardDetail = (id) => request.get(`/parking/card/${id}`)
// 修改月卡
export const updateCard = (data) => request.put('/parking/card/edit', data)
// 删除月卡
export const deleteCard = (id) => request.delete(`/parking/card/${id}`)
// export function deleteCard(id) {
//   return request({
//     url: `/parking/card/${id}`,
//     method: 'DELETE'
//   })
// }
// 批量删除月卡
export function delCardList(idList) {
  return request({
    url: `/parking/card/${idList.join(',')}`,
    method: 'DELETE'
  })
}
